use APSR_final_dataset.dta, clear


**** INFORMATION ON VARIABLES AT THE BOTTOM OF THIS CODE
*****REGRESSIONS MAIN PAPER*****
********************************

***TABLE 1***
set more off
reg county_tax_percap70 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a1, title((1))
reg county_tax_percap70 std_pslh std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860  stateid_* if confederate==1
estimates store a2, title((2))
reg county_tax_percap80 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a3, title((3))
reg county_tax_percap80 std_pslh std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860  stateid_* if confederate==1
estimates store a4, title((4))
reg tax_diff std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a5, title((5))
reg tax_diff std_pslh std_county_land_gini  std_area std_log_pop std_fbprop1860 std_farmval river rail1860  stateid_* if confederate==1
estimates store a6, title((6))
estout   a1 a3 a5 a2 a4 a6 using table1.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
          legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///
	      
***TABLE 2***
set more off
reg county_tax_percap70 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval std_fall_farmval river rail1860 stateid_* if confederate==1
estimates store a1, title((1))
reg county_tax_percap80 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval std_fall_farmval  river rail1860 stateid_* if confederate==1
estimates store a2, title((2))
reg tax_diff std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval std_fall_farmval river rail1860 stateid_* if confederate==1
estimates store a3, title((3))
reg county_tax_percap70 std_pslh std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval std_fall_farmval river rail1860 stateid_* if confederate==1
estimates store a4, title((4))
reg county_tax_percap80 std_pslh std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval std_fall_farmval river rail1860 stateid_* if confederate==1
estimates store a5, title((5))
reg tax_diff std_pslh std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval std_fall_farmval river rail1860 stateid_* if confederate==1
estimates store a6, title((6))

estout   a1 a2 a3 a4 a5 a6 using tablet2.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///

		 
		  ***TABLE 3***			  
*******TABLE BUREAUCRATIC QUALITY 1880 AND PSLAVE *****		  
set more off
reg whipple80_white std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 std_whipple50_white stateid_* if confederate==1
estimates store a1, title((1))		  
reg lg_govt_employ_pc80 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 std_govt_employ_pc50 stateid_* if confederate==1
estimates store a2, title((2))
reg whipple80_white std_pslh std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 std_whipple50_white stateid_* if confederate==1
estimates store a3, title((3))		  
reg lg_govt_employ_pc80 std_pslh std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 std_govt_employ_pc50 stateid_* if confederate==1
estimates store a4, title((4))

estout   a1 a3 a2 a4 using table3.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
   legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///
		  
		  
*****APPENDIX*******************
********************************

***TABLE S1***

sum pslave
sum pslh if pslave!=.
sum fbprop1860 if pslave!=.
sum county_land_gini if pslave!=.
sum AREA_SQMI if pslave!=.
sum totpop1860 if pslave!=.
sum farmval1860 if pslave!=.
sum farmval1870 if pslave!=.
sum county_sei_gini_whitemale if pslave!=.
sum river if pslave!=.
sum rail1860 if pslave!=.
sum fall_farmval if pslave!=.


sum county_tax_percap70_nonlog if pslave!=.
sum county_tax_percap80_nonlog if pslave!=.
sum whipple80_white if pslave!=.
sum govt_employ_pc80 if pslave!=.



***TABlE S2: County Taxes (Assuming 6.6% 1870 Undercount)***

reg county_tax_percap70_adj_rs std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a1, title((1))
reg county_tax_percap80 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a2, title((2))
reg tax_diff_adj_rs std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a3, title((3))

estout   a1 a2 a3 using tableS2.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N)) ///
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) /// 



***Table S3: County Taxes (Assuming 10% 1870 Undercount)***


reg county_tax_percap70_adj std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a1, title((1))
reg county_tax_percap80 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a2, title((2))
reg tax_diff_adj std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a3, title((3))

estout   a1 a2 a3 using tableS3.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N)) ///
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///

***Table S4: County Taxes (White Population as Denominator)***

reg county_tax_percap70_wh std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a1, title((4))
reg county_tax_percap80_wh std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a2, title((5))
reg tax_diff_wh std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a3, title((6))

estout   a1 a2 a3 using tableS4.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N)) ///
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///


***Table S5: OLS Regressions of County Taxes on Racial Status (North)***
** SEE BELOW **

***Table S6: OLS Regressions of County Taxes on Racial Status (No Arkansas)***
reg county_tax_percap70 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1 & state!= 42 
estimates store a1, title((1))
reg county_tax_percap80 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1 & state!= 42
estimates store a2, title((2))
reg tax_diff std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1 & state!= 42
estimates store a3, title((3))

estout   a1 a2 a3 using tableS6.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///


***Table S7: OLS Regressions of County Taxes on Racial Status (No Texas)***
reg county_tax_percap70 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1 & state!= 49 
estimates store a1, title((1))
reg county_tax_percap80 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1 & state!= 49
estimates store a2, title((2))
reg tax_diff std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1 & state!= 49
estimates store a3, title((3))

estout   a1 a2 a3 using tableS7.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///


***Table S8: OLS Regressions of County Taxes on Racial Status (No Arkansas, No Texas)***
reg county_tax_percap70 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1 & state!= 49 & state!= 42
estimates store a1, title((1))
reg county_tax_percap80 std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1 & state!= 49 & state!= 42
estimates store a2, title((2))
reg tax_diff std_pslave std_county_land_gini std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1 & state!= 49 & state!= 42
estimates store a3, title((3))

estout   a1 a2 a3 using tableS8.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///


***Table S9: OLS Regressions of Taxation/Bureaucratic Quality 1880 on Racial-status and Intra-white Inequality***
set more off
reg county_tax_percap70  std_pslave std_county_sei_gini_whitemale std_ineq_int std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a1, title((1))
reg county_tax_percap80  std_pslave std_county_sei_gini_whitemale std_ineq_int std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 stateid_* if confederate==1
estimates store a2, title((2))
reg tax_diff  std_pslave std_county_sei_gini_whitemale std_ineq_int std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 stateid_* if confederate==1
estimates store a3, title((3))
reg whipple80_white std_pslave std_county_sei_gini_whitemale std_ineq_int std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 std_whipple50_white stateid_* if confederate==1
estimates store a4, title((4))
reg lg_govt_employ_pc80 std_pslave std_county_sei_gini_whitemale std_ineq_int std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 std_govt_employ_pc50 stateid_* if confederate==1
estimates store a5, title((5))

estout   a1 a2 a3 a4 a5 using tableS9.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///

***Table S10: OLS Regressions of Taxation/Bureaucratic Quality 1880 on Racial-status and Intra-white Inequality (Without Extreme Values of Prop. Enslaved)***
set more off
reg county_tax_percap70  std_pslave std_county_sei_gini_whitemale std_ineq_int std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1 & pslave>0.01 & pslave<0.69
estimates store a1, title((1))
reg county_tax_percap80  std_pslave std_county_sei_gini_whitemale std_ineq_int std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 stateid_* if confederate==1 &  pslave>0.01 & pslave<0.69
estimates store a2, title((2))
reg tax_diff  std_pslave std_county_sei_gini_whitemale std_ineq_int std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 stateid_* if confederate==1 &  pslave>0.01 & pslave<0.69
estimates store a3, title((3))
reg whipple80_white std_pslave std_county_sei_gini_whitemale std_ineq_int std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 std_whipple50_white stateid_* if confederate==1 & pslave>0.01 & pslave<0.69
estimates store a4, title((4))
reg lg_govt_employ_pc80 std_pslave std_county_sei_gini_whitemale std_ineq_int std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 std_govt_employ_pc50 stateid_* if confederate==1 &  pslave>0.01 & pslave<0.69
estimates store a5, title((5))

estout   a1 a2 a3 a4 a5 using tableS10.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///

***Table S11: OLS Regressions of Taxation/Bureaucratic Quality 1880 on Racial-status and Land Inequality***
set more off
reg county_tax_percap70  std_pslave std_county_land_gini std_ineq_int_land std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a1, title((1))
reg county_tax_percap80  std_pslave std_county_land_gini std_ineq_int_land std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 stateid_* if confederate==1
estimates store a2, title((2))
reg tax_diff  std_pslave std_county_land_gini std_ineq_int_land std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 stateid_* if confederate==1
estimates store a3, title((3))
reg whipple80_white std_pslave std_county_land_gini std_ineq_int_land std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 std_whipple50_white stateid_* if confederate==1
estimates store a4, title((4))
reg lg_govt_employ_pc80 std_pslave std_county_land_gini std_ineq_int_land std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 std_govt_employ_pc50 stateid_* if confederate==1
estimates store a5, title((5))

estout   a1 a2 a3 a4 a5 using tableS11.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///
		  
		  
***Table S12: OLS Regressions of Taxation/Bureaucratic Quality 1880 on Racial Status and Asset Ownership***
		  
set more off
reg county_tax_percap70  std_pslave std_percent_realprop  std_ineq_int_prop std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1   
estimates store a1, title((1))
reg county_tax_percap80  std_pslave std_percent_realprop std_ineq_int_prop std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1   
estimates store a2, title((2))
reg tax_diff  std_pslave std_percent_realprop   std_ineq_int_prop std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1  
estimates store a3, title((3))
reg whipple80_white  std_pslave std_percent_realprop std_ineq_int_prop std_area std_log_pop std_fbprop1860 std_farmval river rail1860 std_whipple50_white  stateid_* if confederate==1   
estimates store a4, title((2))
reg lg_govt_employ_pc80 std_pslave std_percent_realprop  std_ineq_int_prop std_area std_log_pop std_fbprop1860 std_farmval river rail1860 std_govt_employ_pc50 stateid_* if confederate==1  
estimates store a5, title((3))
estout   a1 a2 a3 a4 a5 using tableS12.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///
		  
***Table S13: OLS Regressions of Taxation/Bureaucratic Quality 1880 on Racial-status (Pro- portion Slaveholders) and Occupational Inequality***
set more off
reg county_tax_percap70  std_pslh std_county_sei_gini_whitemale std_ineq_int_pslh std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a1, title((1))
reg county_tax_percap80  std_pslh std_county_sei_gini_whitemale std_ineq_int_pslh std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 stateid_* if confederate==1
estimates store a2, title((2))
reg tax_diff  std_pslh std_county_sei_gini_whitemale std_ineq_int_pslh std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 stateid_* if confederate==1
estimates store a3, title((3))
reg whipple80_white std_pslh std_county_sei_gini_whitemale std_ineq_int_pslh std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 std_whipple50_white stateid_* if confederate==1
estimates store a4, title((4))
reg lg_govt_employ_pc80 std_pslh std_county_sei_gini_whitemale std_ineq_int_pslh std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 std_govt_employ_pc50 stateid_* if confederate==1
estimates store a5, title((5))

estout   a1 a2 a3 a4 a5 using tableS13.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///

***Table S14: OLS Regressions of Taxation/Bureaucratic Quality 1880 on Racial-status (Pro- portion Slaveholders) and Land Inequality***
set more off
reg county_tax_percap70  std_pslh std_county_land_gini std_ineq_int_land_pslh std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1
estimates store a1, title((1))
reg county_tax_percap80  std_pslh std_county_land_gini std_ineq_int_land_pslh std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 stateid_* if confederate==1
estimates store a2, title((2))
reg tax_diff  std_pslh std_county_land_gini std_ineq_int_land_pslh std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 stateid_* if confederate==1
estimates store a3, title((3))
reg whipple80_white std_pslh std_county_land_gini std_ineq_int_land_pslh std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 std_whipple50_white stateid_* if confederate==1
estimates store a4, title((4))
reg lg_govt_employ_pc80 std_pslh std_county_land_gini std_ineq_int_land_pslh std_area std_log_pop std_fbprop1860 std_farmval  river rail1860 std_govt_employ_pc50 stateid_* if confederate==1
estimates store a5, title((5))

estout   a1 a2 a3 a4 a5 using tableS14.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///

		  ***Table S15: OLS Regressions of Taxation/Bureaucratic Quality 1880 on Racial Status (Pro- portion Slaveholders) and Asset Ownership***
		  
set more off
reg county_tax_percap70  std_pslh std_percent_realprop  std_ineq_int_prop_pslh std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1   
estimates store a1, title((1))
reg county_tax_percap80  std_pslh std_percent_realprop std_ineq_int_prop_pslh std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1   
estimates store a2, title((2))
reg tax_diff  std_pslh std_percent_realprop   std_ineq_int_prop_pslh std_area std_log_pop std_fbprop1860 std_farmval river rail1860 stateid_* if confederate==1  
estimates store a3, title((3))
reg whipple80_white  std_pslh std_percent_realprop std_ineq_int_prop_pslh std_area std_log_pop std_fbprop1860 std_farmval river rail1860 whipple50_white  stateid_* if confederate==1   
estimates store a4, title((2))
reg lg_govt_employ_pc80 std_pslh std_percent_realprop  std_ineq_int_prop_pslh std_area std_log_pop std_fbprop1860 std_farmval river rail1860 std_govt_employ_pc50 stateid_* if confederate==1  
estimates store a5, title((3))
estout   a1 a2 a3 a4 a5 using tableS15.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///
		  

***Table S16: Correlation Between Measures of Intra-white Inequality and Proportion Enslaved***
cor county_sei_gini_whitemale county_land_gini percent_no_realprop pslave pslh if confederate==1

***Table S17: Age Heaping by Enumerator Districts 1880 (Whites Only)***
use APSR_enum_dist_dataset.dta, clear

reg  whipple80enum prop_black  if confederate==1
estimates store a1, title((1))
reg  whipple80enum prop_black if confederate==1, cluster(bob)
estimates store a2, title((2))
reg whipple80enum prop_black stateid* if confederate==1
estimates store a3, title((3))
reg whipple80enum prop_black stateid* if confederate==1, cluster(bob)
estimates store a4, title((4))


estout   a1 a2 a3 a4 using tableS17.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
          legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Slaves" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" std_farmval "Farm Value" ///
          rail1860 "rail1860 Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860")  starlevels( * .10 ** .05 *** .01)
	
***Table S5: OLS Regressions of County Taxes on Racial Status (North)***
use APSR_final_dataset_NORTH.dta, clear
reg county_tax_percap70  std_fbprop1860 std_county_land_gini std_area std_log_pop std_farmval river rail1860 stateid_* 
estimates store a1, title((1))
reg county_tax_percap80 std_fbprop1860 std_county_land_gini std_area std_log_pop std_farmval river rail1860 stateid_*
estimates store a2, title((2))
reg tax_diff std_fbprop1860 std_county_land_gini std_area std_log_pop std_farmval river rail1860 stateid_* 
estimates store a3, title((3))

estout   a1 a2 a3 using tableS5.txt, replace cells(b(star fmt(3)) se(par))  style(tex)  ///
              stats(r2_a N, fmt(%9.3f %9.0g) labels("Adj. R-squared" N))      ///   
  legend label collabels(none) varlabels(_cons "Constant" std_county_tax_percap "County Tax Per Capita" std_county_land_gini  "Gini Land Inequality" ///
          std_pslave "Proportion Enslaved" std_pslh "Proportion Slaveholders" std_area "Area Sq Miles" std_log_pop "Log Population 1860" std_prop_small_farm "Proportion Small Farms" ///
		  std_farmval "Farm Value" rail1860 "Rail Access" river  "River Access" std_fbprop1860 "Free Blacks 1860" heap_t60_1860 "Age Heaping 1860") ///
		  starlevels( * .10 ** .05 *** .01) ///



/* ***** ADDITIONAL INFORMATION ON VARIABLEs ****
- The dataset deposited here includes all the measures in the paper 
- We used the full census of 1850 and 1880 to generate the occupational inequality measure, the government employment measure, and the whipple index
- The full census data can be downladed from the Ipums website. county-level data is from ICPSR.
- Whipple index code for 1880 census is below and can be reused for the 1850 census.
- Occupational gini code for 1850 census is below
- The 1860 and 1870 variables are interpolated to 1880 boundaries. We followed Acharya, Blackwell, and Sen's approach ///
 available here : (https://dataverse.harvard.edu/file.xhtml?persistentId=doi:10.7910/DVN/CAEEG7/AK4XQG&version=1.0) ///
 but used 1880 boundaries instead of 2000 boundaries.

****** Whipple index whites 1880 ****
use data_full_1880.dta, clear
keep if race==1
tostring age, generate(age_2)
gen age_3 = reverse(age_2)
generate age_4 = strpos(age_3,"0")
replace age_4=1 if age==5|age==15|age==25|age==35|age==45|age==55|age==65
gen heap = age_4
keep if age >= 22 
keep  if age <= 62 

/*
summing the number of persons in the age range 23 and 62 inclusive, who report ages ending in 0 and 5, 
dividing that sum by the total population between ages 23 and 62 years inclusive, and multiplying the result by 5.*
 */
 gen n_age=1
 collapse (count) n_age (sum) heap, by(county stateicp) 
 gen whipple80_white= (heap/(0.2*n_age))*100 
 gen state=stateicp
 keep state county whipple80_white
 
 
 ******* Occupational gini white males 1850 ****
 use data_occ_lit_185080.dta", clear

keep if year==1850

*** WHITES ONLY ***clear
drop if county==0			
drop if stateicp==35
drop if stateicp==37
drop if stateicp==62
drop if stateicp==65
drop if stateicp==66
drop if stateicp==67
drop if stateicp==100
drop if stateicp==98
drop if stateicp==73
keep if labforce>0
keep if age>=16 & age<=70
keep if race==1
keep if sex==1
drop if occ==999


egen bob_state= group(stateicp)
save temp,replace

forval i=1/34{
keep if bob_state==`i'
egen bob=group(county)
gen gini = 0
gen between = 0
gen within = 0
gen overlap = 0
*ginidesc erscor50, by(bob) m(a1) gk(a2)
ginidesc sei, by(bob) m(a1) gk(a2)

replace gini = a1[1,1] 
replace between = a1[2,1] 
replace within = a1[3,1] 
replace overlap = a1[4,1]

matsort a2 1 "up"

forval j=1/151{
set more off
gen ggini`j'=.
replace ggini`j'=a2[`j', 2] if bob==`j'
}

egen county_sei_gini_whitemale=rowmax(ggini*)
drop ggini*

gen DV = 0
bysort county: replace DV = 1 if _n == 1

keep if DV==1
keep stateicp county county_sei_gini_whitemale

save malewhite_sei_`i', replace

use temp, clear
}

use malewhite_sei_1, clear

append using malewhite_sei_2 malewhite_sei_3 malewhite_sei_4 malewhite_sei_5 malewhite_sei_6 malewhite_sei_7 malewhite_sei_8 malewhite_sei_9 malewhite_sei_10 malewhite_sei_11 malewhite_sei_12 malewhite_sei_13 malewhite_sei_14 malewhite_sei_15 malewhite_sei_16 malewhite_sei_17 malewhite_sei_18 ///
malewhite_sei_19 malewhite_sei_20 malewhite_sei_21 malewhite_sei_22 malewhite_sei_23 malewhite_sei_24 malewhite_sei_25 malewhite_sei_26 malewhite_sei_27 malewhite_sei_28 malewhite_sei_29 malewhite_sei_30 malewhite_sei_31 malewhite_sei_32 malewhite_sei_33 malewhite_sei_34 

rename county_sei_gini_whitemale county_sei_gini_whitemale_1850


****** Code for other variables generated ***
gen tot_farms=farm39 + farm1019 + farm2049 + farm5099 +farm100_1860 + farm500 + farm1000
gen prop_small_farm= (farm39+ farm1019 + farm2049)/tot_farms
gen confederate=1
replace confederate=0 if state_name=="Kentucky"|state_name=="West Virginia"|state_name=="Missouri"
gen log_pop=log(totpop1860)
gen tot_farms=farm39 + farm1019 + farm2049 + farm5099 +farm100_1860 + farm500 + farm1000
gen prop_small_farm= (farm39+ farm1019 + farm2049)/tot_farms
gen pslh= slhtot/whtot
tab(STATE_TERR), gen(stateid_)
gen county_tax_percap70= log((taxcoun_1870 )/totpop1870)
gen county_tax_percap80= log((taxcoun_80)/totpop_80)
gen tax_diff= county_tax_percap80 -	county_tax_percap70
gen	govt_employ_1850= govt_clerk_1850 + govt_not_clerk_1850 + govt_off_1850
gen govt_clerkpc50=govt_clerk_1850/totpop1860
gen govt_employ_pc50= (govt_clerk_1850+ govt_off_1850)/totpop1860
gen	govt_employ_1880= govt_clerk_1880 + govt_not_clerk_1880 + govt_off_1880	
gen govt_clerkpc80=govt_clerk_1880/totpop_80  
gen govt_employ_pc80= (govt_clerk_1880+govt_off_1880)/totpop_80 
gen lg_govt_employ_pc80 = log(govt_employ_pc80)
gen lg_govt_clerkpc80 = log(govt_clerkpc80)
replace lg_govt_clerkpc80= -11 if govt_clerkpc80==0

egen std_log_pop= std(log(totpop1860))
egen std_pslave= std(pslave1860)
egen std_county_land_gini = std(county_land_gini)
egen std_prop_small_farm = std(prop_small_farm)
egen std_farmval= std(farmval1860)
egen std_fbprop1860= std(fbprop1860)
egen std_pslh= std(pslh)
egen std_area= std(AREA)
egen std_fall_farmval= std(farmval1860 - farmval1870)
gen fall_farmval= farmval1860 - farmval1870

egen std_whipple50_white= std(whipple50_white)
egen std_govt_employ_pc50= std(govt_employ_pc50)

gen totpop_1870_adj_rs = whtot_1870 + (cotot_1870*1.0706638116)
gen county_tax_percap70_adj_rs= log((taxcoun_1870 )/totpop_1870_adj_rs)
gen tax_diff_adj_rs= county_tax_percap80 -	county_tax_percap70_adj_rs

gen totpop_1870_adj = whtot_1870 + (cotot_1870*1.1111111111)
gen county_tax_percap70_adj= log((taxcoun_1870 )/totpop_1870_adj)
gen tax_diff_adj= county_tax_percap80 -	county_tax_percap70_adj

gen county_tax_percap70_wh= log((taxcoun_1870 )/whtot_1870)
gen county_tax_percap80_wh= log((taxcoun_80)/whtot_1880)
gen tax_diff_wh= county_tax_percap80_wh -	county_tax_percap70_wh

gen county_tax_percap70_nonlog= taxcoun_1870/totpop1870
gen county_tax_percap80_nonlog= taxcoun_80/totpop_80



************************************t*********		  
*****INTERACTION LAND INEQUALITY AND TAXATION
	  * LAND INEUQALITY **
gen ineq_int_land = county_land_gini* pslave  		 
egen std_ineq_int_land= std(ineq_int_land)

gen ineq_int_land_pslh = 	county_land_gini * pslh  
egen std_ineq_int_land_pslh= std(ineq_int_land_pslh)



*********************************************		  
*****INTERACTION OCC INEQUALITY AND TAXATION
	  ** GINI OCC Ineuqality **		 
		 
gen ineq_int = 		county_sei_gini_whitemale * pslave  
egen std_county_sei_gini_whitemale = std(county_sei_gini_whitemale)		 
egen std_ineq_int= std(ineq_int)

gen ineq_int_pslh = 		county_sei_gini_whitemale * pslh  
egen std_ineq_int_pslh= std(ineq_int_pslh)

	

*********************************************		  
*****INTERACTION REAL PROP AND TAXATION
	  ** REAL PROP Ineuqality **		 
egen std_percent_realprop= std(percent_no_realprop)		 
gen ineq_int_prop = 		percent_no_realprop * pslave  
egen std_ineq_int_prop = std(ineq_int_prop)		 


gen ineq_int_prop_pslhs = 		percent_no_realprop * pslh  
egen std_ineq_int_prop_pslh= std(ineq_int_prop_pslh) 
	

*********************************************
****LABELS FOR VARIABLES WE USED*************

label var totalfarms1860 "Total Number of farms in county 1860"
label var smallfarms1860 "Number of small farms in county 1860"
label var farmval1860 "Farm value"
label var pslave1860 "Proportion Slaves in county 1860"
label var pslh "Proportion Slaveholders 1860"
label var AREA "Std County area 1860"
label var county_land_gini "County Gini Land 1860"
label var prop_small_farm "Proportion small farms 1860"
label var log_pop   "Log Population 1860"
label var fbprop1860 "Proportion of Free Blacks 1860"
label var farmval1860 "Farm value 1860"
label var whtot1860  "Total Whites in county 1860"
label var taxcoun_1870 "Amount taxes in county 1870"
label var totpop1860 "County population 1860"
label var totpop1870 "County population 1870"
label var totpop_80 "County population 1880"
label var govt_clerk_1850 "County government clerks 1850"
label var govt_not_clerk_1850  "County government non-clerks 1850"
label var govt_off_1850 "County government officials 1850"
label var govt_clerk_1880  "County government clerks 1880"
label var govt_not_clerk_1880 "County government non-clerks 1880"
label var govt_off_1880 "County government clerks 1880"
label var whipple50_white "Whipple Index 1850"
label var govt_employ_pc50 "PerCapita County Government Employment 1850"
label var county_sei_gini_whitemale "Occupational Gini White Males 1850"
label var ineq_int "Interaction Occ. Gini x Pslave"
label var ineq_int_land "Interaction Land Gini x PSlave"
label var percent_no_realprop "Proportion with no real property"
label var ineq_int_prop "Interaction  Prop. No Property x PSlave"
label var ineq_int_pslh "Interaction Occ. Gini x Prop Slave holders"
label var ineq_int_land_pslh "Interaction Land Gini x Prop Slave holders"
label var ineq_int_prop_pslh "Interaction Prop. No Property x Prop Slave holders"
label var county_tax_percap70 "Log PerCapita County Tax 1870"
label var county_tax_percap80 "Log PerCapita County Tax 1880"
label var tax_diff "Log PerCapita County Tax 1880- Log PerCapita County Tax 1880"
label var county_tax_percap70_nonlog "PerCapita County Tax 1870 Not Logged"
label var county_tax_percap80_nonlog "PerCapita County Tax 1880 Not Logged"
label var whipple80_white "Whipple Index 1880"
label var lg_govt_employ_pc80 "Log PerCapita County Government Employment 1880"
label var std_pslave "Std Proportion Slaves 1860"
label var std_pslh "Std Proportion Slaveholders 1860"
label var std_area "Std County area 1860"
label var std_county_land_gini "Std County Gini Land 1860"
label var std_prop_small_farm "Std Proportion small farms 1860"
label var std_log_pop   "Std Log Population 1860"
label var std_fbprop1860 "Std Proportion of Free Blacks 1860"
label var std_farmval "Std Farm value 1860"
label var std_fall_farmval "Std Farm value 1860 - Farm value 1870"
label var fall_farmval "Farm value 1860 - Farm value 1870"
label var river "River access 1860"
label var rail1860 "Rail access 1860"
label var std_whipple50_white "Std Whipple Index 1850"
label var std_govt_employ_pc50 "Std PerCapita County Government Employment 1850"
label var std_county_sei_gini_whitemale "Std Occupational Gini White Males 1850"
label var std_ineq_int "Std Interaction Occ. Gini x Pslave"
label var std_ineq_int_land "Std Interaction Land Gini x PSlave"
label var std_percent_realprop "Std Proportion with real property"
label var std_ineq_int_prop "Std Interaction Prop. Property x PSlave"
label var std_ineq_int_pslh "Std Interaction Occ. Gini x Prop Slave holders"
label var std_ineq_int_land_pslh "Std Interaction Land Gini x Prop Slave holders"
label var std_ineq_int_prop_pslh "Std Interaction Prop. Property x Prop Slave holders" */
	
